home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dirut / dx_264.zip / DX.SYN < prev    next >
Text File  |  1991-06-06  |  8KB  |  172 lines

  1. rem
  2. rem    DX.SYN   Synonyms for DX v2.60  Robert K. Blaine/ECONO-SOFT 8/90.
  3. rem
  4. rem    This file is intended as a working sample of a set of synonyms
  5. rem    to make using DX easier. You may use them as is or take them as
  6. rem    examples in developing or augmenting your own. They will work with
  7. rem    a new Command Line Enhancer due out from ECONO-SOFT by the end of
  8. rem    1990 and with the Cove Software Group's PCED product. With minor
  9. rem    changes, they should run with any Command Line Enhancer that does
  10. rem    synonym processing.
  11. rem
  12. rem    This synonym file will run without modification assuming that DX.EXE
  13. rem    is located in a directory on your PATH. To make the synonyms run faster,
  14. rem    it is advantageous to replace all occurances of "dx" in this file with
  15. rem    a call that specifies the entire path -- the best performance will be
  16. rem    achieved by copying DX to a RAM disk as part of your AUTOEXEC.BAT and
  17. rem    then replacing all occurances of "dx" in this file with "x:dx" where
  18. rem    "x:" is the name of the RAM disk.
  19. rem
  20. rem    This synonym file may be loaded into PCED with the following command:
  21. rem      ced -b1024,128,3000,128,128,128 load dx.syn
  22. rem
  23. rem    Try to avoid the use of positional parameters (%1, %2, etc.) as they
  24. rem    make the use of multiple patterns difficult (pattern1+pattern2;pattern3).
  25. rem    If you don't use any positional parameters, PCED will tack all the
  26. rem    parameters on to the end of the synonym. If you must use positional
  27. rem    parameters, using all 9 (as shown in the "comp" example) allows the most
  28. rem    flexibility in adding additional parameters.
  29.  
  30. rem ================ Clear Previous Synonyms ==================================
  31.  
  32. clear  syn
  33.  
  34. rem ================ Quick and Easy Directories ===============================
  35.  
  36. syn    d       "dx"
  37. syn    da      "dx a:"
  38. syn    db      "dx b:"
  39. syn    dc      "dx c:"
  40. syn    dd      "dx d:"
  41.  
  42. rem    Ex:  d                 ;view default directory
  43. rem         db                ;view directory of B:
  44.  
  45. rem ================ Quick and Easy Wide-Format Directories ===================
  46.  
  47. syn    dw      "dx /w"
  48. syn    daw     "dx /w a:"
  49. syn    dbw     "dx /w b:"
  50. syn    dcw     "dx /w c:"
  51. syn    ddw     "dx /w d:"
  52. syn    dcf     "dx %1\"
  53. syn    dcfw    "dx %1\/w"
  54.  
  55. rem    Ex:  dw                 ;view default directory in wide format
  56. rem         dd                 ;view directory of D: in wide format
  57. rem         dcf myzip          ;view directory of MYZIP.ZIP
  58. rem         dcfw myarc         ;wide directory of MYARC.ARC
  59.  
  60. rem ================ Selecting Files ==========================================
  61.  
  62. syn    ld      "dx /ld"
  63. syn    ldw     "dx /ld/w"
  64. syn    new     "dx /at:!a"
  65. syn    sd      "dx /at:!d"
  66. syn    tod*ay  "dx /since"
  67. syn    yes*ter "dx /since:yesterday"
  68.  
  69. rem    Ex:  ld                ;show sizes of all files in each directory in
  70. rem                           ;the tree from the current directory on down
  71. rem         ldw               ;wide-format of the directory tree
  72. rem         new               ;view all files newly created or modified
  73. rem         sd                ;show all directories in current directory
  74. rem         tod               ;view all files created or modified today
  75.  
  76. rem ================ Deleting Files ===========================================
  77.  
  78. syn    cleanup "dx /ff/del/p-/v- \%1.bak+.tmp+.hld+*temp*"
  79. syn    dbak    "dx %1*.bak /del /v- %2 %3 %4 %5 %6 %7 %8 %9"
  80. syn    delsys  "if not '%1' == '' dx %1\ibm*.com+command.com/ro:i/del/f"
  81. syn    dro     "dx /del/v/ro:i"
  82. syn    gobak   "dx /gobak /v-"
  83. syn    vdel    "dx /del/v/ro:n"
  84. syn    vdelzip "dx %1\ /run:'pkzip -d $p $n'"
  85. syn    zdel    "dx /size:0 /del /v-"
  86.  
  87. rem    Ex:  cleanup           ;sweep the default drive and delete all ".BAK",
  88. rem                           ;".TMP",".HLD", and "*TEMP*" files without asking
  89. rem         dbak c:           ;delete all "C:*.BAK" files without verify
  90. rem         delsys a:         ;remove DOS system files from A:
  91. rem         dro               ;verified delete of all files ignoring the
  92. rem                           ;read-only attribute
  93. rem         gobak prog.pas    ;if "PROG.BAK" exists, delete "PROG.PAS"
  94. rem                           ;and rename "PROG.BAK" to "PROG.PAS"
  95. rem         vdel \path        ;verified delete of normal files in "\path";
  96. rem                           ;read-only files never touched
  97. rem         vdelzip myzip     ;verified delete of files in MYZIP.ZIP
  98. rem         zdel              ;delete all zero-length files in this directory
  99. rem         zdel \ /ff        ;sweep the entire disk deleting zero-length files
  100.  
  101. rem ================ Copying, moving, and comparing files and trees ===========
  102.  
  103. syn    comp    "dx /v-/p- %1 /comp:%2 %3 %4 %5 %6 %7 %8 %9"
  104. syn    co*pyc  "dx /v-/p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
  105. syn    coptree "dx %1 /ff /copy:%2\$p\"
  106. syn    mo*ve   "dx /v-/p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
  107. syn    movtree "dx %1 /ff /move:%2\$p\"
  108. syn    vco*pyc "dx /v /p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
  109. syn    vmo*ve  "dx /v /p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
  110.  
  111. rem    Ex:  comp *.pas c:     ;compare all "*.pas" to files on C:
  112. rem         coptree a:\ c:\xx ;copy the entire disk to c: under C:\XX
  113. rem         copy *t e:\save\  ;copy all files ending in "t" to "E:\SAVE"
  114. rem                           ;creating the directory if needed
  115. rem         movtree \here \there  ;move an entire tree from \HERE to \THERE
  116. rem         vmov .hld \hold   ;verified move of all "*.HLD" to "\HOLD"
  117.  
  118. rem ================ File Attribute and Date Manipulation =====================
  119.  
  120. syn    fa      "dx /v- %1 /fa:%2 %3 %4 %5 %6 %7 %8 %9"
  121. syn    fd      "dx /v- %1 /fd:%2 %3 %4 %5 %6 %7 %8 %9"
  122. syn    ro      "dx /fa:r /v-"
  123. syn    ro-all  "dx /at:r- /ff /fa:r /v- /p- \%1.com+.exe+.bat+.dev+.sys"
  124. syn    rw      "dx /fa:r-/v-"
  125. syn    touch   "dx /fdate:now"
  126.  
  127. rem    Ex:  fa newfile a-     ;turn off the archive bit on "newfile"
  128. rem         fd xx 3-sep:6p    ;set xx's date/time to September 3 at 6:00pm
  129. rem         ro file.ext       ;make "file.ext" read-only
  130. rem         ro-all b:         ;sweep the B: drive making all appropriate
  131. rem                           ;files read-only
  132. rem         rw .bas           ;make all "*.bas" read-write
  133. rem         touch .pas        ;set the date/time on all "*.PAS" files in this
  134. rem                           ;directory to the current date/time
  135.  
  136. rem ========================== Utility Options ================================
  137.  
  138. rem  Call Chris Dunford's file differencer, HDIFF, to compare a file with it's
  139. rem  backup version:
  140. syn    diffbak "dx /run:'hdiff -cs $d$p\$f.bak $s'"
  141.  
  142. rem    Ex:  diffbak prog.pas  ;compare prog.bak with prog.pas
  143.  
  144. rem  To print a complete disk directory in "tiny" print on an Epson printer:
  145. syn    fulldir "dx \%1 /f /ff:a /so:*nec /he:2 /st:4 /pr /prm:tiny /prmarg:10"
  146.  
  147. rem  Display free space on a disk, type "free x:"
  148. syn    free    "dx /st:4 /to"
  149.  
  150. rem  To simply create a list of files, type "lf files"
  151. syn    lf*iles "echo $n | dx /b /ex- /o"
  152.  
  153. rem  Test if a set of files exist in another drive/directory and delete them
  154. rem  from this directory if so:
  155.  
  156. syn    tdel    "echo if exist %2$n dx $n/del | dx/b %1"
  157.  
  158. rem    Ex:  tdel .pas b:      ;delete *.pas if present on B: -- verified
  159.  
  160. rem  Verified interface to PRINT.COM (PRINT.COM must have been previously
  161. rem  loaded or the system will hang). (Under DOS 3.x or above, change '$d$n'
  162. rem  below to '$s' to allow you to print from any directory.)
  163.  
  164. syn    vprint  "dx /run:'print $d$n'"
  165.  
  166. rem    Ex:  vprint *.doc      ;verified print of "*.DOC"
  167.  
  168. syn    ff      "dx /ff \"
  169. syn    ffa     "dx /ff:a \"
  170. syn    fs      "dx %1/fs:%2 %3 %4 %5 %6 %7 %8 %9"
  171. syn    view    "dx /view /v-"
  172.